package com.xiyu.service.vo.material.stockIn;

import com.xiyu.service.vo.material.stock.baseVO.MaterialStockInBase;
import com.xiyu.service.vo.material.stock.baseVO.MaterialStockInDetailBase;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import jakarta.validation.constraints.*;
import org.hibernate.validator.constraints.Length;
import jakarta.validation.Valid;
import com.xiyu.service.enums.common.CommonStatusEnum;
import com.xiyu.service.framework.validation.InEnum;
import java.math.BigDecimal;

@Schema(description = "更新入库单")
@Data
public class StockInUpdateInput extends MaterialStockInBase {

    @Schema(description = "物资入库明细")
    @Valid
    private List<detail> details;

    @Schema(description = "物资入库单主键ID")
    private Long id;

    @Schema(description = "物资入库明细")
    @Data
    @Valid
    public static class detail extends MaterialStockInDetailBase {

        @Schema(description = "操作方式")
        private String operateType;

        @Schema(description = "数量")
        @Digits(integer = 13, fraction = 4, message = "数量格式无效")
        @Positive(message = "数量必须大于0")
        @NotNull(message = "数量不能为空")
        private BigDecimal number;

        @Schema(description = "物资入库单主键ID")
        private Long id;
    }

}